#ifndef CUSTOMPROXYMODEL_H
#define CUSTOMPROXYMODEL_H

#include <QSortFilterProxyModel>
#include <QFileSystemModel>
#include <QStringList>
#include <QHash>

class CustomProxyModel : public QSortFilterProxyModel
{
    Q_OBJECT
    
public:
    explicit CustomProxyModel(QObject *parent = nullptr);
    void setSelectedLanguages(const QStringList &languages);
    void setSizeFilter(const QString &sizeFilter);
    
protected:
    bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override;
    
private:
    QFileSystemModel *fileModel() const;
    bool matchesLanguageFilter(const QFileInfo &fileInfo) const;
    bool matchesSizeFilter(const QFileInfo &fileInfo) const;
    
    QStringList m_selectedLanguages;
    QString m_sizeFilter;
    QHash<QString, QStringList> m_extensionCache;
};

#endif // CUSTOMPROXYMODEL_H 